@echo off

chcp 65001 > nul

set "folder_path=%~dp0"
set "output_file=%folder_path%output.txt"

set /p "file_type=请输入要查找的文件类型（如pdf、txt）: "

(for %%F in ("%folder_path%\*.%file_type%") do (
    echo %%~nxF
)) > "%output_file%"

chcp 936 > nul
